<?php
namespace app\api\controller;
use app\common\controller\Api;
use app\api\controller\Shiku;


class Bank extends Api
{

    public function test(){
        $config['aesKey']      = "cX5slsed9CIQoMUhOPlvbT2HHhN4ins5S9dGTAWwWjVrR3cuKjOK7i8LMiwphZVc";//aes_key
        $config['md5Key']      = "6Mt6FW1BLvTxgpeFeDVAtOoxSgqXYi6Dmlo37o9ROMNWepins7Vlmt8RWeFHTan0";//md5_key
        $config['midPlatform'] = "1000100056";
        $config['api_url']     = "http://111.204.236.194:7010/kubaitiao/external/merchant/api";
        
        //初始化
        $kufenqi = new Shiku($config);
        //拼装数据
        
        //商户交易查询
        $data['midTransaction'] = '1000100056';
        $data['time']           = time() * 1000;
        $data['opType']         = 4003;
        
        
        $data['data']['status']    = 200;
        $data['data']['startTime'] = '2018-07-01';
        $data['data']['endTime']   = '2018-07-11';
        
        $data['risk']['deviceType'] = 10;
        $data['risk']['ip']         = '127.0.0.1';
        
        
        // dump($data);die;
        
        //发起请求
        $reponse = $kufenqi->execute($data);
        
        dump($reponse);die;
    }

}

